package service;

import dao.LoginMapper;
import org.springframework.stereotype.Service;
import pojo.Manager;
import pojo.User;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService{
    LoginMapper loginMapper;
    public void setLoginMapper(LoginMapper loginMapper){
        this.loginMapper=loginMapper;
    }
    @Override
    public User login(User user) {
        return loginMapper.login(user);
    }

    @Override
    public int updatePassword(User user) {
        return loginMapper.updatePassword(user);
    }

    @Override
    public int cancelUser(User user) {
        return loginMapper.cancelUser(user);
    }

    @Override
    public int activeUser(User user) {
        return loginMapper.activeUser(user);
    }

    @Override
    public List<User> queryUser() {
        return loginMapper.queryUser();
    }

    @Override
    public int addUser(User user) {
        return loginMapper.addUser(user);
    }

    @Override
    public int addManager(Manager manager) {
        return loginMapper.addManager(manager);
    }

    @Override
    public List<Manager> queryManager() {
        return loginMapper.queryManager();
    }

    @Override
    public Manager findManage(Manager manager) {
        return loginMapper.findManage(manager);
    }

    @Override
    public int deleteManager(Manager manager) {
        return loginMapper.deleteManager(manager);
    }

    @Override
    public int updateManager(Manager manager) {
        return loginMapper.updateManager(manager);
    }
}
